﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using Hsinchu.Model;

namespace Hsinchu.BLL
{
    /*
     * 用户组业务逻辑
     */
    public class AdminGroup
    {
        DAL.DataProcess dllDataProcess = new Hsinchu.DAL.DataProcess();


        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="AdminGroup"></param>
        /// <returns></returns>
        public int AddUserGroup(Model.MAdminGroup admingroup)
        {
            string _spName = "Insert_UserGroup";
            object[] _value = new object[1];
            _value[0] = admingroup.GroupName;
            return dllDataProcess.getAffectRows(_spName, _value);            
        }


        /// <summary>
        /// 查询所有的用户组
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable GetUserGroup()
        {
            string _spName = "Select_UserGroup";
            return dllDataProcess.getDataTable(_spName);
        }
    }
}
